/*
Copyright (C) 2022-2024 Inspur Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/
package model

type ResponseContent struct {
	OperationId string `json:"operationId"`
}

type DidDocumentDetail struct {
	RequestId string           `json:"requestID"`
	Content   *ResponseContent `json:"content"`
}

type PublicKey struct {
	Id           string `json:"id"`
	Type         string `json:"type"`
	PublicKeyHex string `json:"publicKeyHex"`
	PublicKey    string `json:"publicKey"`
}

type KeyPair struct {
	Id            string `json:"id"`
	Type          string `json:"type"`
	PublicKeyHex  string `json:"publicKeyHex"`
	PrivateKeyHex string `json:"privateKeyHex"`
}

type Service struct {
	Id              string `json:"id"`
	Type            string `json:"type"`
	ServiceEndpoint string `json:"serviceEndpoint"`
}

type Proof struct {
	Type           string `json:"type"`
	Creator        string `json:"creator"`
	SignatureValue string `json:"signatureValue"`
}

type DocumentDetail struct {
	Document Document `json:"document"`
	TxId     string   `json:"txId"`
}

type Document struct {
	Context        string      `json:"@context,omitempty"`
	Id             string      `json:"id,omitempty"`
	Version        string      `json:"version,omitempty"`
	Created        string      `json:"created,omitempty"`
	Updated        string      `json:"updated,omitempty"`
	KeyPairs       []KeyPair   `json:"keyPairs,omitempty"`
	PublicKey      []PublicKey `json:"publicKey,omitempty"`
	Authentication []string    `json:"authentication,omitempty"`
	Recovery       []string    `json:"recovery,omitempty"`
	Service        []Service   `json:"service,omitempty"`
	Proof          Proof       `json:"proof,omitempty"`
}

type Content struct {
	Document Document `json:"document"`
}

type Resource struct {
	Resources PublicKey `json:"resource"`
}

type EndpointUrl struct {
	EndpointUrls string `json:"serviceEndpointUrl"`
}
